<template>
  <el-aside width="18%" style="height: 100%;overflow-x: hidden">
    <el-aside width="100%" style="height: 100%;overflow-x: hidden;">
      <el-menu style="min-height: 100%; overflow-x: hidden;background-color: var(--lightBg);border: none"
               router
               ref="menu"
               :default-active="defaultActiveUrl"
      >
        <!--头像和登录键-->
        <div style="height: 40px; line-height: 40px;margin: 32px 12px 32px 15px;display: flex;flex-direction: row;"
             @click="login">
          <span><el-avatar style="border: solid 1px black" :size="40" :src="defaultUrl">{{
              initials
            }}</el-avatar></span>
          <span style="width: 100%;cursor: pointer;font-weight: 700;margin-left: 12px;letter-spacing: normal"
                class="clickToLogin">
          {{ username }}
          <span style="display: inline-block;float: right">
         <i class="el-icon-arrow-right" style="font-weight: 800;"></i>
          </span>
        </span>
        </div>
        <!--        <el-menu-item index="/home" class="leftSection">-->
        <!--          <svg t="1680360816994" class="icon leftSectionInner" viewBox="0 0 1024 1024" version="1.1"-->
        <!--               xmlns="http://www.w3.org/2000/svg"-->
        <!--               p-id="2784" width="20" height="20">-->
        <!--            <path-->
        <!--                d="M322.56 913.92v-318.179556a51.2 51.2 0 0 1 51.2-51.2h275.911111a51.2 51.2 0 0 1 51.2 51.2v318.179556h121.571556V559.616a51.2 51.2 0 0 1 102.4 0v405.504a51.2 51.2 0 0 1-51.2 51.2H149.617778a51.2 51.2 0 0 1-51.2-51.2V562.005333a51.2 51.2 0 1 1 102.4 0v351.914667h121.742222z m102.4 0h173.511111v-266.979556H424.96v266.979556zM94.663111 533.845333a51.2 51.2 0 1 1-71.111111-73.671111L477.354667 22.186667a51.2 51.2 0 0 1 71.111111 0.056889l152.405333 147.626666a51.2 51.2 0 0 1-71.281778 73.500445L512.796444 130.275556l-418.133333 403.569777z m637.610667-190.976a51.2 51.2 0 0 1 71.281778-73.557333l197.063111 190.919111a51.2 51.2 0 0 1-71.281778 73.557333l-197.063111-190.919111z"-->
        <!--                fill="currentColor" p-id="2785"></path>-->
        <!--          </svg>-->
        <!--          <span slot="title">首页</span>-->
        <!--        </el-menu-item>-->
        <el-submenu index="manage">
          <template slot="title">
            <svg t="1689660354736" class="icon leftSectionInner" viewBox="0 0 1024 1024" version="1.1"
                 xmlns="http://www.w3.org/2000/svg"
                 p-id="3048" width="20" height="20">
              <path
                  d="M415.488 41.6256H126.0544A84.224 84.224 0 0 0 41.6256 126.0544v289.4336a84.224 84.224 0 0 0 84.4288 84.4288h289.4336a84.5312 84.5312 0 0 0 84.4288-84.4288V126.0544A84.5312 84.5312 0 0 0 415.488 41.6256z m12.0832 373.76a11.9808 11.9808 0 0 1-12.0832 12.0832H126.0544a11.9808 11.9808 0 0 1-12.0832-12.0832V126.0544a11.9808 11.9808 0 0 1 12.0832-12.0832h289.4336a11.9808 11.9808 0 0 1 12.0832 12.0832zM415.488 524.0832H126.0544a84.224 84.224 0 0 0-84.4288 84.4288v289.4336a84.224 84.224 0 0 0 84.4288 84.4288h289.4336a84.5312 84.5312 0 0 0 84.4288-84.4288v-289.4336a84.5312 84.5312 0 0 0-84.4288-84.4288z m12.0832 373.76a11.9808 11.9808 0 0 1-12.0832 12.0832H126.0544a11.9808 11.9808 0 0 1-12.0832-12.0832v-289.3312a11.9808 11.9808 0 0 1 12.0832-12.0832h289.4336a11.9808 11.9808 0 0 1 12.0832 12.0832zM775.424 455.0656a206.7456 206.7456 0 1 0-206.4896-206.4896 207.104 207.104 0 0 0 206.4896 206.4896zM897.9456 524.0832h-289.4336a84.224 84.224 0 0 0-84.4288 84.4288v289.4336a84.224 84.224 0 0 0 84.4288 84.4288h289.4336a84.5312 84.5312 0 0 0 84.4288-84.4288v-289.4336a84.5312 84.5312 0 0 0-84.4288-84.4288z m12.0832 373.76a11.9808 11.9808 0 0 1-12.0832 12.0832h-289.4336a11.9808 11.9808 0 0 1-12.0832-12.0832v-289.3312a11.9808 11.9808 0 0 1 12.0832-12.0832h289.4336a11.9808 11.9808 0 0 1 12.0832 12.0832z"
                  fill="currentColor" p-id="3049"></path>
            </svg>
            <span>系统管理</span>
          </template>
          <!--          <el-menu-item index="/user" class="leftSection" style="margin-left: 25px;padding-left: 20px!important">-->
          <!--            <svg style="margin-left: 0" t="1689662281716" class="icon leftSectionInner" viewBox="0 0 1024 1024"-->
          <!--                 version="1.1" xmlns="http://www.w3.org/2000/svg"-->
          <!--                 p-id="5209" width="20" height="20">-->
          <!--              <path-->
          <!--                  d="M481.28 536.384A251.52 251.52 0 1 0 481.216 33.28 251.52 251.52 0 0 0 481.28 536.32z m0-73.6a177.92 177.92 0 1 1 0-355.84 177.92 177.92 0 0 1 0 355.84z"-->
          <!--                  fill="currentColor" p-id="5210"></path>-->
          <!--              <path-->
          <!--                  d="M869.12 637.504c-85.12-89.6-220.8-137.6-376.32-137.6-274.56 0-471.04 146.56-471.04 384.64 0.64 35.2 14.72 69.12 40.32 93.44 15.36 15.36 40.32 16.64 56.32 1.92 15.36-14.08 16.64-37.76 2.56-53.76l-1.28-1.28a54.784 54.784 0 0 1-18.56-40.96c0-190.72 156.8-307.2 391.68-307.2 117.12-7.04 231.68 33.92 318.08 112.64 15.36 16 39.68 16.64 56.32 1.92a37.76 37.76 0 0 0 3.2-53.76c-0.64 0.64-0.64 0.64-1.28 0zM726.4 806.464h245.12c14.72-1.92 28.8 8.32 30.72 23.04 0.64 2.56 0.64 5.12 0 7.68 1.92 14.72-8.32 28.8-23.04 30.72-2.56 0.64-5.12 0.64-7.68 0h-245.12a27.328 27.328 0 0 1-30.72-23.04 15.616 15.616 0 0 1 0-7.68c-1.92-14.72 8.32-28.8 23.04-30.72 2.56-0.64 5.12-0.64 7.68 0zM603.52 928.704h368c14.72-1.92 28.8 8.32 30.72 23.04 0.64 2.56 0.64 5.12 0 7.68 1.92 14.72-8.32 28.8-23.04 30.72-2.56 0.64-5.12 0.64-7.68 0H603.52a27.328 27.328 0 0 1-30.72-23.04 15.616 15.616 0 0 1 0-7.68c-1.92-14.72 8.32-28.8 23.04-30.72 2.56-0.64 5.12-0.64 7.68 0z"-->
          <!--                  fill="currentColor" p-id="5211"></path>-->
          <!--            </svg>-->
          <!--            <span slot="title">用户管理</span>-->
          <!--          </el-menu-item>-->
          <!--          <el-menu-item index="/care-home" class="leftSection" style="margin-left: 25px;padding-left: 20px!important">-->
          <!--            <svg style="margin-left: 0" t="1692088023980" class="icon leftSectionInner" viewBox="0 0 1024 1024"-->
          <!--                 version="1.1" xmlns="http://www.w3.org/2000/svg"-->
          <!--                 p-id="7427" width="20" height="20">-->
          <!--              <path-->
          <!--                  d="M597.333333 85.333333H187.733333a102.4 102.4 0 0 0-102.4 102.4v682.666667a68.266667 68.266667 0 0 0 68.266667 68.266667h512a34.133333 34.133333 0 0 0 34.133333-34.133334V187.733333a102.4 102.4 0 0 0-102.4-102.4z m2.56 68.352A34.133333 34.133333 0 0 1 631.466667 187.733333v682.666667H153.6V187.733333a34.133333 34.133333 0 0 1 34.133333-34.133333h409.6l2.56 0.085333z"-->
          <!--                  fill="currentColor" p-id="7428"></path>-->
          <!--              <path-->
          <!--                  d="M870.4 426.666667H665.6a34.133333 34.133333 0 0 0-34.133333 34.133333v443.733333a34.133333 34.133333 0 0 0 34.133333 34.133334h204.8a68.266667 68.266667 0 0 0 68.266667-68.266667V494.933333a68.266667 68.266667 0 0 0-68.266667-68.266666zM699.733333 870.4V494.933333h170.666667v375.466667H699.733333z"-->
          <!--                  fill="currentColor" p-id="7429"></path>-->
          <!--              <path-->
          <!--                  d="M426.666667 290.133333v136.533334h136.533333v68.266666h-136.533333v136.533334h-68.266667v-136.533334h-136.533333v-68.266666h136.533333v-136.533334h68.266667z"-->
          <!--                  fill="currentColor" p-id="7430"></path>-->
          <!--            </svg>-->
          <!--            <span slot="title">养老院管理</span>-->
          <!--          </el-menu-item>-->
          <el-menu-item index="/elder" class="leftSection" style="margin-left: 25px;padding-left: 20px!important">
            <svg style="margin-left: 0" t="1694751782901" class="icon leftSectionInner" viewBox="0 0 1024 1024"
                 version="1.1" xmlns="http://www.w3.org/2000/svg"
                 p-id="1987" width="20" height="20">
              <path
                  d="M630.4256 467.712c-80.9472 0-146.7904-65.8432-146.7904-146.7904 0-3.3792 0.1536-6.8608 0.4608-10.9056a30.7968 30.7968 0 0 1 22.4256-27.3408l210.3296-58.5216c12.4416-3.4816 25.7536 1.2288 33.28 11.776 17.7664 24.9344 27.136 54.3232 27.136 84.992-0.0512 80.9472-65.8944 146.7904-146.8416 146.7904zM546.304 335.36c6.8608 40.192 41.984 70.912 84.1216 70.912 47.0528 0 85.3504-38.2976 85.3504-85.3504 0-10.752-1.9968-21.248-5.8368-31.0784L546.304 335.36zM728.2688 667.5968c-6.4512 0-12.6976 0.7168-18.7904 1.9968-3.7888-8.4992-9.0624-16.4864-15.9232-23.552L485.7856 429.1072a106.30656 106.30656 0 0 0-142.336-9.3696c-165.8368 130.7648-234.5984 298.2912-204.3904 497.8176 2.2528 15.0016 15.2064 26.112 30.3616 26.112 163.328 0 384.4096 1.536 386.6112 1.536h0.2048c8.0896 0 15.872-3.2256 21.6576-8.9088a30.85312 30.85312 0 0 0 9.0624-21.8112v-146.1248c15.4112 11.264 34.4576 16.8448 53.6576 15.5136a81.408 81.408 0 0 0 9.3184-1.2288c5.1712 3.8912 11.52 6.2464 18.4832 6.2464 16.9472 0 30.72-13.7728 30.72-30.72 0-2.2016 0.256-4.3008 0.7168-6.3488 3.7888-4.9664 6.912-10.1888 9.4208-15.6672 5.12-4.4032 11.7248-7.1168 18.9952-7.1168 16.0768 0 29.1328 13.056 29.1328 29.1328v161.9968c0 16.9472 13.7728 30.72 30.72 30.72s30.72-13.7728 30.72-30.72v-161.9968c0-49.92-40.6528-90.5728-90.5728-90.5728z m-106.7008 49.8176l-44.544-40.8576a30.6688 30.6688 0 0 0-33.1264-5.4784 30.67392 30.67392 0 0 0-18.3296 28.1088v184.4224c-62.208-0.4096-206.848-1.2288-329.1136-1.3312-17.6128-166.6048 43.0592-302.336 185.0368-414.2592 18.176-14.336 44.0832-12.6464 60.1088 3.84l207.7696 216.9344a19.7632 19.7632 0 0 1 5.4784 16.5888c-3.0208 4.1984-5.6832 8.6528-7.9872 13.3632-3.0208 2.2528-6.6048 3.6352-10.4448 3.8912-5.4784 0.3584-10.8032-1.536-14.848-5.2224z"
                  fill="currentColor" p-id="1988"></path>
              <path
                  d="M432.7424 365.2608c-19.712 0-37.8368-13.056-43.3664-32.9216-9.8816-35.584 7.4752-72.448 39.424-88.2176 1.6384-12.288 3.9936-27.5968 7.1168-43.3152 6.8096-34.6624 13.2608-67.3792 59.136-86.4256 31.488-13.056 101.3248-31.6416 126.8736-35.8912 24.0128-3.9936 59.1872-5.9904 87.6544 23.3472 8.8576 9.1136 28.3136 30.1568 46.4384 49.92l2.2528-0.6144c40.2432-11.2128 82.0224 12.4416 93.2352 52.6336 6.656 23.9104-7.424 48.7424-31.2832 55.3984l-375.3984 104.448c-4.0448 1.1264-8.0896 1.6384-12.0832 1.6384z m214.016-227.584c-3.9424 0-8.704 0.4096-14.6432 1.4336-22.3232 3.7376-86.8352 20.992-113.4592 32.0512-13.7216 5.6832-15.7184 7.7312-22.4256 41.5232-4.6592 23.6032-7.4752 46.1312-8.704 57.4976a30.72 30.72 0 0 1-11.9296 21.0944l267.264-74.3424a30.62784 30.62784 0 0 1-19.3536-9.7792c-16.896-18.4832-46.9504-51.1488-58.0096-62.5152-3.6352-3.7376-7.936-6.9632-18.7392-6.9632z"
                  fill="currentColor" p-id="1989"></path>
            </svg>
            <span slot="title">老人管理</span>
          </el-menu-item>
          <el-submenu index="/medicine" style="padding-left: 17px">
            <template slot="title">
              <svg style="margin-left: 10px" t="1694496125278" class="icon leftSectionInner" viewBox="0 0 1024 1024"
                   version="1.1"
                   xmlns="http://www.w3.org/2000/svg" p-id="16408" width="20" height="20">
                <path
                    d="M106.666667 298.666667a42.666667 42.666667 0 0 1 42.666666-42.666667h725.333334a42.666667 42.666667 0 0 1 42.666666 42.666667v554.666666a42.666667 42.666667 0 0 1-42.666666 42.666667H149.333333a42.666667 42.666667 0 0 1-42.666666-42.666667V298.666667z m85.333333 42.666666v469.333334h640V341.333333H192z"
                    fill="currentColor" p-id="16409"></path>
                <path d="M362.666667 533.333333h298.666666v85.333334H362.666667v-85.333334z" fill="currentColor"
                      p-id="16410"></path>
                <path
                    d="M554.666667 426.666667v298.666666h-85.333334V426.666667h85.333334zM277.333333 149.333333a42.666667 42.666667 0 0 1 42.666667-42.666666h384a42.666667 42.666667 0 0 1 42.666667 42.666666v149.333334a42.666667 42.666667 0 0 1-42.666667 42.666666H320a42.666667 42.666667 0 0 1-42.666667-42.666666V149.333333z m85.333334 42.666667v64h298.666666V192H362.666667z"
                    fill="currentColor" p-id="16411"></path>
              </svg>
              <span>用药管理</span>
            </template>
            <el-menu-item index="/medication" class="leftSection"
                          style="margin-left: 25px;padding-left: 20px!important">
              <svg style="margin-left: 0;" t="1694496025227" class="icon leftSectionInner" viewBox="0 0 1024 1024"
                   version="1.1"
                   xmlns="http://www.w3.org/2000/svg" p-id="16040" width="20" height="20">
                <path
                    d="M896.32 220.33C877.1 148.59 831.09 88.63 766.77 51.5l-23.34-13.48C679.11 0.89 604.18-8.98 532.44 10.24 460.7 29.47 400.74 75.47 363.6 139.79l-259.92 450.2c-37.13 64.32-47 139.25-27.78 210.99 19.22 71.74 65.23 131.7 129.55 168.83l23.34 13.48c42.85 24.74 90.39 37.37 138.57 37.37 24.15 0 48.47-3.18 72.42-9.59 71.74-19.22 131.7-65.23 168.83-129.55l259.92-450.2c37.15-64.32 47.01-139.25 27.79-210.99zM553.19 849.52c-39.6 68.59-111.7 106.98-185.73 106.98-36.29 0-73.04-9.22-106.66-28.63l-23.34-13.48c-102.21-59.01-137.36-190.18-78.35-292.4l101.76-176.26c17.65 0.34 108.7 5.61 228.24 74.64 67.99 39.26 110.31 79.41 133.84 106.18 18.82 21.41 28.93 37.88 32.95 45.08L553.19 849.52z m259.93-450.2l-121.5 210.45c-26.86-36.09-78.8-91.88-170.5-144.82-97.14-56.09-178.8-74.45-224.91-80.41L419.04 171.8c39.6-68.59 111.69-106.98 185.73-106.98 36.29 0 73.04 9.22 106.67 28.64l23.34 13.48c102.2 59 137.35 190.17 78.34 292.38z"
                    fill="currentColor" p-id="16041"></path>
                <path
                    d="M633.67 113.16c-43.31-4.14-81.99 5.02-129.33 30.63-57.1 30.88-105.45 116.86-110.77 126.57-8.5 15.49-2.83 34.95 12.66 43.45a31.843 31.843 0 0 0 15.37 3.95c11.3 0 22.26-6 28.08-16.61 11.14-20.3 50.69-82.45 85.11-101.06 41.84-22.62 67.36-25.64 92.81-23.21 1.04 0.1 2.06 0.15 3.08 0.15 16.3 0 30.24-12.4 31.82-28.96 1.66-17.6-11.24-33.23-28.83-34.91z"
                    fill="currentColor" p-id="16042"></path>
              </svg>
              <span slot="title">药品管理</span>
            </el-menu-item>
            <el-menu-item index="/medication-list" class="leftSection"
                          style="margin-left: 25px;padding-left: 20px!important">
              <svg style="margin-left: 0" t="1691665871183" class="icon leftSectionInner" viewBox="0 0 1281 1024"
                   version="1.1"
                   xmlns="http://www.w3.org/2000/svg" p-id="4358" width="20" height="20">
                <path
                    d="M1109.456115 2.946763c92.086331 0 168.702158 76.615827 168.702158 168.702158v677.018705c0 92.086331-76.615827 168.702158-168.702158 168.702158H174.595683c-92.086331 2.946763-168.702158-72.932374-168.702158-165.018705V171.648921C5.893525 79.56259 82.509353 2.946763 174.595683 2.946763h934.860432z m95.033094 850.141007V167.228777c0-47.148201-40.517986-86.929496-86.929497-86.929496H170.17554c-47.148201 0-86.929496 40.517986-86.929497 86.929496v689.542446c0 47.148201 40.517986 86.929496 86.929497 86.929496h946.647482c47.148201-3.683453 87.666187-40.517986 87.666187-90.612949z"
                    fill="currentColor" p-id="4359"></path>
                <path
                    d="M785.842647 379.027338c0-21.364029 17.680576-38.307914 39.044605-38.307914h231.320863c21.364029 0 39.044604 17.680576 39.044604 39.044605s-17.680576 38.307914-39.044604 38.307913h-231.320863c-22.100719 0-39.044604-17.680576-39.044605-39.044604z m0 345.507914c0-21.364029 17.680576-38.307914 39.044605-38.307914h231.320863c21.364029 0 39.044604 17.680576 39.044604 39.044604s-17.680576 38.307914-39.044604 38.307914h-231.320863c-22.100719 0-39.044604-17.680576-39.044605-39.044604z m0-185.646043c0-21.364029 17.680576-38.307914 39.044605-38.307914h231.320863c21.364029 0 39.044604 17.680576 39.044604 39.044604s-17.680576 38.307914-39.044604 38.307914h-231.320863c-22.100719 0-39.044604-17.680576-39.044605-39.044604z"
                    fill="currentColor" p-id="4360"></path>
                <path
                    d="M307.50941 817.152a166.786763 166.786763 0 0 1-92.764086-28.141583 166.661525 166.661525 0 0 1-61.506302-74.958273 166.492086 166.492086 0 0 1-9.50331-96.46964 166.41105 166.41105 0 0 1 45.67482-85.49295l218.016231-218.008863a165.79223 165.79223 0 0 1 54.102561-36.171511A165.946935 165.946935 0 0 1 525.326734 265.208633h0.191539c44.599252 0 86.583252 17.356432 118.098878 48.93836a166.064806 166.064806 0 0 1 36.171511 54.161496A166.344748 166.344748 0 0 1 692.489209 432.238504c0 22.012317-4.272806 43.575252-12.69318 63.930014a166.064806 166.064806 0 0 1-36.171511 54.168863l-218.082532 217.876259a165.79223 165.79223 0 0 1-54.102562 36.178878 165.946935 165.946935 0 0 1-63.79741 12.69318h-0.132604v0.073669zM215.062101 557.733755a129.517583 129.517583 0 0 0-28.392058 42.36708 129.52495 129.52495 0 0 0-9.886388 50.021294c0 34.897036 13.591942 67.694504 38.278446 92.381008a129.804892 129.804892 0 0 0 42.241841 28.333122 129.819626 129.819626 0 0 0 49.829756 9.945324h0.375712a129.657554 129.657554 0 0 0 92.381007-38.278446l96.152864-96.145497-184.762015-184.769381-96.211798 96.145496z m306.691683 62.972317l96.152863-96.145496a129.517583 129.517583 0 0 0 28.392058-42.359713 129.52495 129.52495 0 0 0 9.886389-50.021295 129.657554 129.657554 0 0 0-38.278447-92.381007 129.804892 129.804892 0 0 0-42.234474-28.333122 129.819626 129.819626 0 0 0-49.829756-9.952691h-0.324144a129.775424 129.775424 0 0 0-92.381007 38.278446l-96.211798 96.152864 184.835683 184.762014z m58.699511-224.44754a18.417266 18.417266 0 0 1-12.892086-5.363108 59.215194 59.215194 0 0 0-42.101871-17.415366c-15.890417 0-30.882072 6.188201-42.109237 17.415366a17.967885 17.967885 0 0 1-12.634245 5.105267c-4.847424 0-9.444374-1.915396-12.818417-5.296806a18.196259 18.196259 0 0 1-0.198907-25.452662l0.707223-0.707223a95.511942 95.511942 0 0 1 67.053583-27.301755c25.585266 0 49.697151 9.945324 67.819741 28.008978a18.048921 18.048921 0 0 1 4.022331 19.839079 18.056288 18.056288 0 0 1-16.781813 11.227166l-0.066302-0.058936z"
                    fill="currentColor" p-id="4361"></path>
              </svg>
              <span slot="title">药单管理</span>
            </el-menu-item>
            <el-menu-item index="/medication-records" class="leftSection"
                          style="margin-left: 25px;padding-left: 20px!important">
              <svg style="margin-left: 0" t="1691666501942" class="icon leftSectionInner" viewBox="0 0 1024 1024"
                   version="1.1"
                   xmlns="http://www.w3.org/2000/svg" p-id="15242" width="20" height="20">
                <path
                    d="M72.008859 64.007875v896.01575h703.992125v-224.027562a32.003937 32.003937 0 0 1 64.007875 0v223.996062a64.007875 64.007875 0 0 1-64.007875 64.007875H72.008859A64.007875 64.007875 0 0 1 8.000984 959.992125V64.007875A64.007875 64.007875 0 0 1 72.008859 0h415.988188a32.003937 32.003937 0 0 1 0 64.007875z"
                    fill="currentColor" p-id="15243"></path>
                <path
                    d="M919.987203 102.6268a192.149625 192.149625 0 0 1 70.276363 262.205487l-96.011813 166.256676a192.149625 192.149625 0 0 1-332.54485-192.149625l96.011812-166.256675a192.149625 192.149625 0 0 1 262.268488-70.276363z m-270.899471 213.128583l-32.035437 55.376892a128.01575 128.01575 0 1 0 220.846068 129.496247l0.850499-1.480497 32.003937-55.408392z m32.003938-55.408391l221.696567 128.015749 32.003937-55.439891a127.98425 127.98425 0 1 0-220.846068-129.464747l-0.850499 1.480497z"
                    fill="currentColor" p-id="15244"></path>
                <path
                    d="M296.004922 256h192.149625a28.349945 28.349945 0 0 1 32.003937 32.003937 28.349945 28.349945 0 0 1-32.003937 32.003938h-192.149625a28.349945 28.349945 0 0 1-32.003938-32.003938 28.349945 28.349945 0 0 1 32.003938-32.003937z"
                    fill="currentColor" p-id="15245"></path>
                <path
                    d="M168.020672 256a28.349945 28.349945 0 0 1 32.003937 32.003937 28.349945 28.349945 0 0 1-32.003937 32.003938 28.349945 28.349945 0 0 1-32.003938-32.003938 28.349945 28.349945 0 0 1 32.003938-32.003937z"
                    fill="currentColor" p-id="15246"></path>
                <path
                    d="M168.020672 703.992125a28.349945 28.349945 0 0 1 32.003937 32.003938 28.349945 28.349945 0 0 1-32.003937 32.003937 28.349945 28.349945 0 0 1-32.003938-32.003937 28.349945 28.349945 0 0 1 32.003938-32.003938z"
                    fill="currentColor" p-id="15247"></path>
                <path
                    d="M168.020672 478.389566a28.349945 28.349945 0 0 1 32.003937 32.003937 28.349945 28.349945 0 0 1-32.003937 32.003938 28.349945 28.349945 0 0 1-32.003938-32.003938 28.349945 28.349945 0 0 1 32.003938-32.003937z"
                    fill="currentColor" p-id="15248"></path>
              </svg>
              <span slot="title">用药记录</span>
            </el-menu-item>
          </el-submenu>
<!--          <el-menu-item index="/passage" class="leftSection" style="margin-left: 25px;padding-left: 20px!important">-->
<!--            <svg style="margin-left: 0" t="1700120136528" class="icon leftSectionInner" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"-->
<!--                 p-id="2394" width="20" height="20">-->
<!--              <path-->
<!--                  d="M288 416h192c17.67 0 32-14.33 32-32s-14.33-32-32-32H288c-17.67 0-32 14.33-32 32s14.33 32 32 32zM288 576h352c17.69 0 32-14.31 32-32s-14.31-32-32-32H288c-17.67 0-32 14.31-32 32s14.33 32 32 32zM480 672H288c-17.67 0-32 14.31-32 32s14.33 32 32 32h192c17.67 0 32-14.31 32-32s-14.33-32-32-32zM939.98 645.16L826.84 532.02c-6.25-6.25-14.44-9.37-22.63-9.37s-16.38 3.12-22.63 9.37L553.37 760.24c-6 6-9.37 14.14-9.37 22.63V896c0 17.67 14.33 32 32 32h113.14c8.49 0 16.63-3.37 22.63-9.37l228.21-228.21c12.49-12.5 12.49-32.76 0-45.26zM675.88 864H608v-67.88L804.21 599.9l67.88 67.88L675.88 864z"-->
<!--                  fill="currentColor" p-id="2395"></path>-->
<!--              <path-->
<!--                  d="M448 864H192V160h383.86l0.11 128.09c0.06 35.23 28.78 63.91 64 63.91H768v80c0 17.67 14.33 32 32 32s32-14.33 32-32V274.87c0-8.58-3.45-16.8-9.56-22.82L673.09 105.18A32.002 32.002 0 0 0 650.66 96H160c-17.67 0-32 14.33-32 32v768c0 17.67 14.33 32 32 32h288c17.67 0 32-14.33 32-32s-14.33-32-32-32z m319.72-576H639.97l-0.1-125.73L767.72 288z"-->
<!--                  fill="currentColor" p-id="2396"></path>-->
<!--            </svg>-->
<!--            <span slot="title">推文管理</span>-->
<!--          </el-menu-item>-->
        </el-submenu>
        <el-submenu index="stat">
          <template slot="title">
            <svg t="1700117801891" class="leftSectionInner icon" viewBox="0 0 1032 1024" version="1.1"
                 xmlns="http://www.w3.org/2000/svg"
                 p-id="4288" width="20" height="20">
              <path
                  d="M1014.997308 555.522391h-0.787736a55.366559 55.366559 0 0 0-55.028958-50.583878H522.043629V67.688994a55.254025 55.254025 0 0 0-54.803891-55.141491V11.309632l-6.189351 0.675202A499.987032 499.987032 0 0 0 15.24831 497.117424l-0.1688-0.225067v13.560305a500.043299 500.043299 0 0 0 450.303423 498.917963 497.736359 497.736359 0 0 0 367.759987-109.889115 498.355294 498.355294 0 0 0 182.304522-337.826034l-0.450134-6.133085z m-889.466015-45.013462a390.097917 390.097917 0 0 1 286.398154-376.650146v426.277488c0 30.440354 24.701137 55.141491 55.141491 55.141492h425.939887a390.660586 390.660586 0 0 1-376.762679 286.792021h-0.618936a388.241112 388.241112 0 0 1-276.157591-115.009396 388.016045 388.016045 0 0 1-113.940326-270.924776h0.056267l-0.056267-5.626683z"
                  fill="currentColor" p-id="4289"></path>
              <path
                  d="M604.024397 412.829716c10.46563 10.521897 24.363536 16.31738 39.105445 16.31738l315.150503 0.337601a54.972691 54.972691 0 0 0 52.215616-37.755042h1.294137l0.844003-4.670146c0.675202-3.938678 0.675202-7.98989 0.675202-12.941371l0.393868-5.514149c0.393868-5.570416 0.731469-11.028298 0.731468-16.767514A340.526842 340.526842 0 0 0 637.109292 14.122974a55.028958 55.028958 0 0 0-49.177208 54.691356v293.937909c0.112534 1.744272 0.225067 3.54481 0.506402 5.289082a53.340953 53.340953 0 0 0-0.506402 5.68295 54.353756 54.353756 0 0 0 16.092313 39.105445z m297.426452-94.021869h-203.066982l0.112534-195.020826a230.300126 230.300126 0 0 1 202.954448 195.020826z"
                  fill="currentColor" p-id="4290"></path>
            </svg>
            <span>数据统计</span>
          </template>
          <el-menu-item index="/log" class="leftSection" style="margin-left: 25px;padding-left: 20px!important">
            <svg style="margin-left: 0" t="1696913307358" class="icon leftSectionInner" viewBox="0 0 1024 1024"
                 version="1.1" xmlns="http://www.w3.org/2000/svg"
                 p-id="2557" width="20" height="20">
              <path
                  d="M504.552727 867.607273H203.869091a33.047273 33.047273 0 0 1-31.185455-34.443637v-213.876363h40.261819a34.909091 34.909091 0 0 0 0-69.818182H172.683636v-160.116364h40.261819a34.909091 34.909091 0 1 0 0-69.818182H172.683636V142.196364a33.047273 33.047273 0 0 1 31.185455-34.676364h624.174545a33.047273 33.047273 0 0 1 31.185455 34.676364v333.498181a34.909091 34.909091 0 0 0 69.818182 0V142.196364a103.098182 103.098182 0 0 0-101.003637-104.494546H203.869091a103.098182 103.098182 0 0 0-101.003636 104.494546v177.338181H69.818182a34.909091 34.909091 0 0 0 0 69.818182h33.047273v160.116364H69.818182a34.909091 34.909091 0 0 0 0 69.818182h33.047273v213.876363a102.865455 102.865455 0 0 0 101.003636 104.261819h300.683636a34.909091 34.909091 0 0 0 0-69.818182z"
                  p-id="2558" fill="currentColor"></path>
              <path
                  d="M726.109091 288.814545a34.909091 34.909091 0 0 0-34.909091-34.90909H329.774545a34.909091 34.909091 0 1 0 0 69.818181H691.2a34.909091 34.909091 0 0 0 34.909091-34.909091zM329.774545 415.650909a34.909091 34.909091 0 0 0 0 69.818182H605.090909a34.909091 34.909091 0 0 0 0-69.818182zM525.265455 577.163636h-195.49091a34.909091 34.909091 0 1 0 0 69.818182h195.49091a34.909091 34.909091 0 0 0 0-69.818182zM947.2 749.614545l-74.24-128.930909a29.789091 29.789091 0 0 0-25.367273-14.429091H698.181818a29.090909 29.090909 0 0 0-25.134545 14.429091l-74.472728 128.930909a28.392727 28.392727 0 0 0 0 29.09091L674.909091 907.636364a28.858182 28.858182 0 0 0 25.134545 14.661818h148.712728a29.323636 29.323636 0 0 0 24.203636-14.661818l74.24-128.930909a28.392727 28.392727 0 0 0 0-29.09091z m-116.363636 114.501819h-116.363637l-57.716363-99.84 57.716363-99.84h116.363637l57.716363 99.84z"
                  p-id="2559" fill="currentColor"></path>
              <path
                  d="M773.352727 691.432727a72.843636 72.843636 0 1 0 72.610909 72.843637 72.843636 72.843636 0 0 0-72.610909-72.843637z m0 87.505455a14.661818 14.661818 0 0 1-14.661818-14.661818 14.661818 14.661818 0 1 1 14.661818 14.661818z"
                  p-id="2560" fill="currentColor"></path>
            </svg>
            <span slot="title">线上访问统计</span>
          </el-menu-item>
          <el-menu-item index="/attendance" class="leftSection" style="margin-left: 25px;padding-left: 20px!important">
            <svg style="margin-left: 0" t="1698138654451" class="icon leftSectionInner" viewBox="0 0 1024 1024"
                 version="1.1" xmlns="http://www.w3.org/2000/svg"
                 p-id="2404" width="20" height="20">
              <path
                  d="M556.8 839.04H463.36a96 96 0 0 1-96-95.36V136.96a96 96 0 0 1 96-96H556.8a96 96 0 0 1 96 96v606.72a96 96 0 0 1-96 95.36zM463.36 104.96a32 32 0 0 0-32 32v606.72a31.36 31.36 0 0 0 32 31.36H556.8a32 32 0 0 0 32-31.36V136.96a32.64 32.64 0 0 0-32-32zM200.32 839.04H106.88a96 96 0 0 1-96-95.36V576a96 96 0 0 1 96-96h93.44A96 96 0 0 1 296.32 576v170.88a96 96 0 0 1-96 92.16zM106.88 540.8a32 32 0 0 0-32 32v170.88a31.36 31.36 0 0 0 32 31.36h93.44a31.36 31.36 0 0 0 32-31.36V576a32 32 0 0 0-32-32zM917.12 839.04h-93.44a96 96 0 0 1-96-95.36V428.8a96.64 96.64 0 0 1 96-96h93.44a96 96 0 0 1 96 96v314.88a96 96 0 0 1-96 95.36zM823.68 396.8a32.64 32.64 0 0 0-32 32v314.88a32 32 0 0 0 32 31.36h93.44a31.36 31.36 0 0 0 32-31.36V428.8a32 32 0 0 0-32-32zM981.12 951.04H42.88a32 32 0 0 1-32-32 32 32 0 0 1 32-32h938.24a32 32 0 0 1 32 32 32 32 0 0 1-32 32z"
                  fill="currentColor" p-id="2405"></path>
            </svg>
            <span slot="title">线下探望统计</span>
          </el-menu-item>
        </el-submenu>

        <!--        <el-menu-item index="/setting" class="leftSection">-->
        <!--          <svg t="1689833717723" class="icon leftSectionInner" viewBox="0 0 1024 1024" version="1.1"-->
        <!--               xmlns="http://www.w3.org/2000/svg"-->
        <!--               p-id="7043" width="20" height="20">-->
        <!--            <path-->
        <!--                d="M1015.51 639.82a41.1 41.1 0 0 0-19.15-24.96l-112.1-64.72c1.28-12.66 1.93-25.41 1.93-38.14 0-19.4-1.5-38.77-4.47-57.88l108.49-70.58c19.03-12.38 24.42-37.85 12.04-56.88L880.1 138.92a41.126 41.126 0 0 0-25.95-17.8 41.164 41.164 0 0 0-30.93 5.76l-108.49 70.59a372.65 372.65 0 0 0-49.63-26.97V41.11C665.1 18.41 646.69 0 623.98 0H400.02c-22.7 0-41.11 18.41-41.11 41.11v129.38a371.834 371.834 0 0 0-66.06 38.2l-112.1-64.72a41.132 41.132 0 0 0-31.2-4.11 41.1 41.1 0 0 0-24.96 19.15L12.61 352.98c-11.35 19.66-4.62 44.81 15.05 56.16l112.1 64.72a376.83 376.83 0 0 0-1.93 38.14c0 19.4 1.5 38.77 4.47 57.88L33.81 640.46c-19.03 12.38-24.42 37.85-12.04 56.88L143.9 885.07c12.38 19.03 37.85 24.43 56.88 12.04l108.49-70.58a372.65 372.65 0 0 0 49.63 26.97v129.39c0 22.7 18.41 41.11 41.11 41.11h223.96c22.7 0 41.11-18.41 41.11-41.11V825.75c0-22.7-18.41-41.11-41.11-41.11s-41.11 18.41-41.11 41.11v116.02H441.13V825.75c0-17.38-10.93-32.88-27.29-38.72-28.28-10.09-54.78-24.49-78.76-42.8-13.82-10.55-32.78-11.26-47.36-1.78l-97.32 63.31-77.29-118.81 97.26-63.28a41.122 41.122 0 0 0 17.58-43.96c-5.25-22.1-7.91-44.89-7.91-67.73 0-17.62 1.59-35.3 4.72-52.54 3.1-17.08-4.86-34.27-19.89-42.95l-100.5-58.02 70.87-122.75 100.56 58.06c15.05 8.69 33.95 6.98 47.19-4.29 27.04-23 57.61-40.67 90.85-52.54 16.37-5.84 27.29-21.34 27.29-38.72V82.22h141.74v116.02c0 17.38 10.93 32.88 27.29 38.72 28.28 10.09 54.78 24.49 78.76 42.79 13.82 10.55 32.79 11.26 47.36 1.78l97.32-63.31 77.29 118.81-97.26 63.28a41.122 41.122 0 0 0-17.58 43.96c5.25 22.1 7.91 44.89 7.91 67.73 0 17.63-1.59 35.31-4.72 52.54-3.1 17.08 4.86 34.27 19.89 42.95l100.5 58.02-70.87 122.75L748.2 730.2c-19.66-11.35-44.81-4.62-56.16 15.05-11.35 19.66-4.62 44.81 15.05 56.16l136.16 78.61a41.132 41.132 0 0 0 31.2 4.11 41.1 41.1 0 0 0 24.96-19.15l111.98-193.96a41.09 41.09 0 0 0 4.12-31.2z"-->
        <!--                p-id="7044" fill="currentColor" :color="svgColor"></path>-->
        <!--            <path-->
        <!--                d="M512 324.34c-103.47 0-187.66 84.18-187.66 187.66S408.53 699.66 512 699.66 699.66 615.47 699.66 512 615.48 324.34 512 324.34z m0 293.1c-58.14 0-105.44-47.3-105.44-105.44S453.87 406.56 512 406.56 617.44 453.86 617.44 512 570.14 617.44 512 617.44z"-->
        <!--                p-id="7045" fill="currentColor" :color="svgColor"></path>-->
        <!--          </svg>-->
        <!--          <span slot="title">系统设置</span>-->
        <!--        </el-menu-item>-->

      </el-menu>
    </el-aside>
  </el-aside>
</template>

<script>
export default {
  name: "LeftAside",
  data() {
    return {
      //显示在头像旁的用户名。如果本地内存中没有用户，则显示点击登录
      username: localStorage.getItem('user') ? JSON.parse(localStorage.getItem('user')).name.toUpperCase() : '点击登录',
    }
  },
  computed: {
    //已登录状态，修改头像为用户名首字符
    initials() {
      if (!this.username) {
        return ''
      }
      const firstChar = this.username.charAt(0)
      if (firstChar.match(/[a-zA-Z]/)) {
        return firstChar.toUpperCase()
      }
      return firstChar
    },
    //未登录状态，设置默认头像
    defaultUrl() {
      if (this.username === '点击登录') {
        return require('@/assets/avatar.png')
      } else {
        return ''
      }
    },
    //根据路由确定默认高亮显示的导航栏项
    defaultActiveUrl() {
      let result = this.$route.path !== '/home/recent' ? this.$route.path : '/home'

      if (result === '/list') {
        let length = this.$route.fullPath.length - this.$route.fullPath.search('=') - 1
        result = '#' + this.$route.fullPath.slice(-length)
      }
      return result
    },
    //图标颜色
    svgColor() {
      return '#000000'
    }
  },
  methods: {
    login() {
      //如果已登录的话跳转至个人中心
      if (localStorage.getItem('user') !== null) {
        //如果当前页面不是个人中心则跳转
        if (this.$router.currentRoute.fullPath !== '/mine') {
          this.$router.push('/mine')
        }
      } else {
        //如果当前页面不是login的话才进行跳转
        if (this.$router.currentRoute.fullPath !== '/login') {
          this.$router.push('/login')
        }
      }
    }
  }
}
</script>

<style scoped>

/*点击登录悬浮*/
.clickToLogin:hover .el-icon-arrow-right, .clickToLogin:hover {
  color: var(--btn);
}

.clickToLogin *, .clickToLogin {
  transition: 0.2s;
}

/*选项*/
.leftSection {
  height: 40px;
  border-radius: 3px;
  margin: 8px;
  line-height: 15px;
  padding: 10px !important;
  font-weight: 600;
  font-size: 16px;
  color: var(--deepText);
  transition: color 0s linear, background-color 0.2s linear;
}

.leftSection:hover {
  background-color: var(--hover);
}

/*响应元素*/
.leftSection.is-active {
  background-color: var(--btn) !important;
  color: var(--btnText);
  cursor: default;
}

.el-avatar {
  background-color: var(--deepText);
  color: var(--deepBg);
  font-size: 20px;
  line-height: 40px;
}

.leftSectionInner {
  font-size: 15px;
  margin-right: 15px;
  margin-left: 5px;
}

/deep/ .el-submenu__title {
  height: 40px;
  border-radius: 3px;
  margin: 4px 8px;
  line-height: 15px;
  padding: 10px !important;
  font-weight: 600;
  font-size: 16px;
  color: var(--deepText);
}

/deep/ .el-submenu__title:hover {
  background-color: var(--hover) !important;
}

/deep/ .el-submenu__icon-arrow {
  font-size: 15px !important;
}


/deep/ .el-menu .el-menu--inline {
  background: var(--leftSe);
}

/deep/ .el-menu-item:focus {
  background-color: var(--btn);
}

/deep/ .el-menu--inline .el-menu-item {
  font-size: 15px !important;
  font-weight: normal;
}

/*图标样式*/
svg > path {
  color: var(--deepText);
}

.leftSection.is-active > svg > path {
  color: var(--btnText);
}

</style>